#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
  printf("I am process!!");
  pid_t id=fork();
  if(id>0)
  {
    while(1)
    {
      printf("I am parent process,pid=%d,ppid=%d\n",getpid(),getppid());
      sleep(1);
    }
  }
  else if(id==0)
  {
    while(1)
    {
      printf("I am child process,pid=%d,ppid=%d\n",getpid(),getppid());
      sleep(1);
    }
  }
  else 
  {
    printf("error\n");
  }
  return 0;
}



